<script setup lang="ts">
defineProps<{
  count: number
}>()

const emit = defineEmits<{
  (e: 'update:count', value: number): void
}>()
</script>

<template>
  <div>
    <button @click="emit('update:count', count - 1)">-</button>
    {{ count }}
    <button @click="emit('update:count', count + 1)">+</button>
  </div>
</template>

<style scoped></style>
